import { Input as InputNutUi, ConfigProvider } from '@nutui/nutui-react-taro';

import type { InputProps as InputNutUiProps } from '@nutui/nutui-react-taro/dist/types/packages/input/index.taro';

import type { FC } from 'react';

interface InputProps extends Partial<InputNutUiProps> {
  border?: boolean;
}
const Input: FC<InputProps> = ({ border, ...rest }) => {
  return (
    <ConfigProvider
      theme={border ? { '--nutui-input-border-bottom-width': '1px' } : {}}
    >
      <InputNutUi {...rest} />
    </ConfigProvider>
  );
};

export default Input;
